import numpy as np

# 创建一个简单的示例
x = np.linspace(0, 1, 4)
y = np.linspace(0, 1, 3)

# 使用 numpy.meshgrid 来模拟 ndgrid 的行为
x_grid = np.tile(x[:, None], (1, len(y)))
y_grid = np.tile(y[None, :], (len(x), 1))

print("x grid:")
print(x_grid)
print("y grid:")
print(y_grid)